package com.zkthink.ceres.member.enums;


import com.zkthink.exception.BizException;
import lombok.Getter;

//0:普通新用户 1:普通老用户 2: 3: 4:预销户 5 销户
@Getter
public enum MemberTypeEnum {
    PuTong_New(0, "普通新用户"),
    PuTong_Old(1, "普通老用户"),
    Service_Star(2, "服务之星"),
    Service_Club(3, "服务网点"),
    Ready_XiaoHu(4, "预销户"),
    XiaoHu(5, "销户"),
//    Union_ChuangShiRen_1(6,"联合创始人第一期"),
//    Market_ZongJian(7,"市场总监"),
//    YunYing_ZongJian(8,"运营总监"),
//    JianYu_ZongCai(9,"教育总裁"),
//    Market_ZongCai(10,"市场总裁"),
//    Market_DongshiZhang(11,"市场董事长"),
//    Union_ChuangShiRen_2(12,"联合创始人第二期"),
//    Union_ChuangShiRen_3(13,"联合创始人第三期"),
//    Union_ChuangShiRen_4(14,"联合创始人第四期"),
    ;

    private int code;

    private String desc;

    MemberTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MemberTypeEnum getDscByType(Integer type) {
        for (MemberTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
